#pragma once
#include <Windows.h>
#include <string>

namespace vrts
{
    namespace version
    {
        enum class VersionPhase : int
        {
            VP_Na,
            VP_Alpha,
            VP_Beta,
            VP_Release,
        };

        enum class VersionCompareResult : int
        {
            VR_Na = 0x0,
            VR_Same = 0x1,
            First_New = 0x2,
            Second_New = 0x4,
            First_Unknown = 0x8,
            Second_Unknown = 0x10,
            VR_Both_Unknown = 0x20,
        };

        struct FileVersionInfo
        {
            VS_FIXEDFILEINFO fixedFileInfo;
            std::string companyName = "";
            std::string productName = "";
            std::string productVersion = "";
        };

        FileVersionInfo GetFileVersionInfoLW(const std::string &file);
        VersionCompareResult CompareProductVersion(const FileVersionInfo &first, const FileVersionInfo &second);
        VersionCompareResult CompareProductVersion(const std::string &first, const std::string &second);
        VersionPhase GetVersionPhase(const FileVersionInfo &info);
    }
}